-
Notifications
You must be signed in to change notification settings - Fork 79
[GEN][ZH] Fix Hero Radar issues introduced by #1035 #1240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Would you mind adding a bit more information about the fixes? EDIT: I think the issue description speaks for itself, but the code might not. |
Okay, so this fixes the crash problem and likely the issue with enemy heroes always showing on the radar. So one thing i did notice from this is that Observers don't get hero icons showing on the radar. I wonder if there is some logic broken elsewhere that is stopping "revealed" heroes from showing for players and observers. |
The condition for showing hero icons is |
Yeah i just noticed that, so hero icons were only ever meant to show up for your own heroes and not all revealed heroes. It was actually quite nice to spot all heroes when as an observer. Could be a nice feature to add later on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fixes both issues with crashing on load and in the replay that was crashing.
The game crash was likely due to enemy heroes being on another players radar when they should not have been.
Done. |
Yeah it's nice. |
It's also what caused the crash when the hero was in the tunnel system in the replay. lol |
Replicated to Generals without conflicts. |
This change fixes 2 issues that were introduced by #1035.
Issue 1
Hero icons from team mates or enemies were visible on the Radar. This issue happened because the changed code incorrectly added all Hero objects to
m_cachedHeroObjectList
, and not just those that areisLocallyControlled
.Issue 2
Using Saveload with Hero units could crash the game. I suspect this happened because after xfer not all objects were purged from
m_cachedHeroObjectList
. The new code will now rebuildm_cachedHeroObjectList
after xfer load, because that also rebuilt the underlying radar object lists.TODO